package org.jeecg.modules.message.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.modules.message.entity.SmsInterconnectAccount;
import org.jeecg.modules.message.mapper.SmsInterconnectAccountMapper;
import org.jeecg.modules.message.service.ISmsInterconnectAccountService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * @Description: 短信账户
 * @Author: jeecg-boot
 * @Date:   2022-11-17
 * @Version: V1.0
 */
@Service
public class SmsInterconnectAccountServiceImpl extends ServiceImpl<SmsInterconnectAccountMapper, SmsInterconnectAccount> implements ISmsInterconnectAccountService {

    @Override
    public SmsInterconnectAccount querybyClintIdAndSecret(String clientId, String secret) {
        LambdaQueryWrapper<SmsInterconnectAccount> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(SmsInterconnectAccount::getClientId, clientId)
                .eq(SmsInterconnectAccount::getSecret, secret)
                .eq(SmsInterconnectAccount::getDelFlag,0);
       return getOne(queryWrapper);
    }
}
